package cre.sample.test.bigdata;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author penglai
 * @Date 2016/9/28.
 */
public class ListenBean {
    private Long id;
    private Integer randomTimes;
    private String progress;
    private String trackId;
    private String albumId;

    public ListenBean(Long id, Integer randomTimes, String progress, String trackId, String albumId) {
        this.id = id;
        this.randomTimes = randomTimes;
        this.progress = progress;
        this.trackId = trackId;
        this.albumId = albumId;
    }

    public static ListenBean buildWithInfo(String info) {
        String[] infos = StringUtils.split(info);
        return new ListenBean(Long.valueOf(infos[0]), Integer.valueOf(infos[1]), (infos[2]), infos[3], infos[4]);
    }

    public Long getId() {
        return id;
    }

    public String getTrackId() {
        return trackId;
    }

    public Integer getRandomTimes() {
        return randomTimes;
    }

    public String getProgress() {
        return progress;
    }
}
